// API配置
export const API_BASE_URL = 'http://localhost:8000';  // 使用远程服务器地址

// 路由配置
export const ROUTER_MODE = 'history';

// 静态资源配置
export const STATIC_PATH = 'http://localhost:8000/static/';  // 使用远程静态资源路径

// 上传路径配置
export const UPLOAD_PATH = 'http://localhost:8000/upload/';  // 使用远程上传路径

// 检测结果图片路径配置
export const VIEW_DETECTION_PATH = 'http://localhost:8000/static/view_detection';  // 使用远程检测结果路径

// 临时文件访问路径
export const TMP_PATH = 'http://localhost:8000/tmp/';  // 使用远程临时文件路径

// API端点配置  
export const API_ENDPOINTS = {
  UPLOAD: `${API_BASE_URL}/upload/`,
  LOGIN: `${API_BASE_URL}/auth/login`,
  REGISTER_BASIC: `${API_BASE_URL}/auth/register/basic`,
  REGISTER_COMPLETE: `${API_BASE_URL}/auth/register/complete`,
  USER_PROFILE: `${API_BASE_URL}/profile/me`,
  // 个人资料相关API端点
  PROFILE_GET: `${API_BASE_URL}/profile/me`,
  PROFILE_UPDATE: `${API_BASE_URL}/profile/me`,
  PROFILE_AVATAR: `${API_BASE_URL}/profile/avatar`,
  PUBLIC_PROFILE: (userId) => `${API_BASE_URL}/profile/user/${userId}`,
  // 社区相关API端点
  COMMUNITY_POSTS: `${API_BASE_URL}/community/posts`,
  COMMUNITY_POST_DETAIL: (postId) => `${API_BASE_URL}/community/post-detail/${postId}`,
  COMMUNITY_POST_COMMENTS: (postId) => `${API_BASE_URL}/community/post-comment/${postId}`,
  COMMUNITY_POST_LIKE: (postId) => `${API_BASE_URL}/community/post-like/${postId}`,
  COMMUNITY_POST_LIKE_STATUS: (postId) => `${API_BASE_URL}/community/post-like-status/${postId}`,
  COMMUNITY_POST_DELETE: (postId) => `${API_BASE_URL}/community/post-delete/${postId}`,
  COMMUNITY_AUDIO: (scoreId) => `${API_BASE_URL}/community/post-audio/${scoreId}`,
  // 关注相关API端点
  FOLLOW_USER: (userId) => `${API_BASE_URL}/community/user-follow/${userId}`,
  UNFOLLOW_USER: (userId) => `${API_BASE_URL}/community/user-unfollow/${userId}`,
  CHECK_FOLLOW_STATUS: (userId) => `${API_BASE_URL}/community/follow-status/${userId}`,
  GET_FOLLOWERS: (userId) => `${API_BASE_URL}/community/user-followers/${userId}`,
  GET_FOLLOWING: (userId) => `${API_BASE_URL}/community/user-following/${userId}`,
  // 系统通知相关API端点
  SYSTEM_NOTIFICATIONS: `${API_BASE_URL}/notifications/system`,
  SYSTEM_NOTIFICATION_CREATE: `${API_BASE_URL}/notifications/system/create`,
  SYSTEM_NOTIFICATION_UPDATE: (notificationId) => `${API_BASE_URL}/notifications/system/${notificationId}`,
  SYSTEM_NOTIFICATION_DELETE: (notificationId) => `${API_BASE_URL}/notifications/system/${notificationId}`,
  SYSTEM_NOTIFICATION_READ: (notificationId) => `${API_BASE_URL}/notifications/system/read/${notificationId}`,
  USER_NOTIFICATIONS: `${API_BASE_URL}/notifications/user`,
};

// 文件大小限制
export const MAX_UPLOAD_SIZE = 10 * 1024 * 1024; // 10MB

// 配置axios默认值
import axios from 'axios'
axios.defaults.baseURL = API_BASE_URL 